<?php
/**
 * 文章
 *
 *
 *
 * @copyright  Copyright (c) 2007-2015 ShopNC Inc. (http://www.shopnc.net)
 * @license    http://www.shopnc.net
 * @link       http://www.shopnc.net
 * @since      File available since Release v1.1
 */



defined('ByShopWWI') or exit('Access Invalid!');
class articleControl extends mobileHomeControl{

    public function __construct() {
        parent::__construct();
    }

    public function indexOp() {
        $this->article_listOp();
    }

    /**
     * 文章列表
     */
    public function article_listOp() {
        $ac_id = intval($_POST['ac_id']);//分类
		//$article_show
        $model_article = Model('article');
			
        $condition = array();
        if($ac_id > 0) {
            $condition['ac_id'] = $ac_id;
			$condition['article_show'] =1;
        }
        $article_list = $model_article->getArticleList($condition);
		if(empty($article_list)){
			$article_list =array();
		}
        output_data(array('article_list' => $article_list));
    }
	function article_infoOp(){
		$art_id = $_POST['article_id'];
		$model_article = Model('article');
		$article = $model_article->getOneArticle($art_id);
		output_data(array('article' => $article));
	}
	

}
